[Ivy]
[>Created: Fri Jan 25 15:52:13 ICT 2013]
13C651D0D77E6CDE 3.17 #module
>Proto >Proto Collection #zClass
LS0 LoginDAS Big #zClass
LS0 B #cInfo
LS0 #process
LS0 @TextInP .resExport .resExport #zField
LS0 @TextInP .type .type #zField
LS0 @TextInP .processKind .processKind #zField
LS0 @AnnotationInP-0n ai ai #zField
LS0 @TextInP .xml .xml #zField
LS0 @TextInP .responsibility .responsibility #zField
LS0 @StartSub f0 '' #zField
LS0 @EndSub f1 '' #zField
LS0 @GridStep f2 '' #zField
LS0 @PushWFArc f3 '' #zField
LS0 @PushWFArc f4 '' #zField
>Proto LS0 LS0 LoginDAS #zField
LS0 f0 inParamDecl '<ch.ivy.demo.UserInfo userInfo> param;' #txt
LS0 f0 inParamTable 'out.currentUser=param.userInfo;
' #txt
LS0 f0 outParamDecl '<ch.ivy.demo.UserInfo userInfo> result;
' #txt
LS0 f0 outParamTable 'result.userInfo=in.currentUser;
' #txt
LS0 f0 actionDecl 'ch.ivy.demo.Data out;
' #txt
LS0 f0 callSignature loginDAS(ch.ivy.demo.UserInfo) #txt
LS0 f0 type ch.ivy.demo.Data #txt
LS0 f0 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>loginDAS</name>
        <nameStyle>8,5,7
</nameStyle>
    </language>
</elementInfo>
' #txt
LS0 f0 83 51 26 26 14 0 #rect
LS0 f0 @|StartSubIcon #fIcon
LS0 f1 type ch.ivy.demo.Data #txt
LS0 f1 83 307 26 26 14 0 #rect
LS0 f1 @|EndSubIcon #fIcon
LS0 f2 actionDecl 'ch.ivy.demo.Data out;
' #txt
LS0 f2 actionTable 'out=in;
' #txt
LS0 f2 actionCode 'import ch.ivy.demo.GroupUsers;
import ch.ivy.demo.UserInfo;

if(ivy.#session.getAttribute("userList") != null) {
in.groupUser = ivy.#session.getAttribute("userList") as GroupUsers;
	for(int i = 0; i <  in.groupUser .listUser.size(); i++)
	{
			if(in.groupUser .listUser.get(i).userName == in.currentUser.userName && in.groupUser .listUser.get(i).password == in.currentUser.password)
			{
				in.currentUser = in.groupUser.listUser.get(i).clone();
				in.currentUser.isSuccessful = true;
				ivy.log.info("found");
			}
	}
	
} else {
	in.currentUser.userRole = "guest";
	in.currentUser.isSuccessful = false;
	ivy.log.info("not found");
}
' #txt
LS0 f2 type ch.ivy.demo.Data #txt
LS0 f2 79 164 34 24 20 -2 #rect
LS0 f2 @|StepIcon #fIcon
LS0 f3 expr out #txt
LS0 f3 96 77 96 164 #arcP
LS0 f4 expr out #txt
LS0 f4 96 188 96 307 #arcP
>Proto LS0 .type ch.ivy.demo.Data #txt
>Proto LS0 .processKind CALLABLE_SUB #txt
>Proto LS0 0 0 32 24 18 0 #rect
>Proto LS0 @|BIcon #fIcon
LS0 f0 mainOut f3 tail #connect
LS0 f3 head f2 mainIn #connect
LS0 f2 mainOut f4 tail #connect
LS0 f4 head f1 mainIn #connect
